/**
 * Created by liujz on 3/6/17.
 */
const Person = require('./person').Person;

class Student extends Person{
    constructor(name,age,klass){
        super(name,age);
        this.klass = klass;
        klass.appendMember(this);
    }

    introduce(){
        return `My name is ${this.name}. I am ${this.age} years old. I am a Student. I am `+(this.klass.leader.id === this.id?'Leader of ':'at ')+`Class ${this.klass.num}.`;
    }
}

module.exports.Student = Student;
